# 设置 CMake 最低版本
cmake_minimum_required(VERSION 3.5)

# 设置项目名称
project(MyProtoBufProject)

list(APPEND CMAKE_PREFIX_PATH
    "protobuf/"
    "libzmq/"
    "libnanomsg/")

message(STATUS ${CMAKE_PREFIX_PATH})

# 查找 Protocol Buffers 库
find_package(protobuf REQUIRED CONFIG)
find_package(ZeroMQ REQUIRED CONFIG)
find_package(nanomsg REQUIRED CONFIG)

include_directories(
    ${ZeroMQ_INCLUDE_DIR}
    ${nanomsg_INCDIR}
)

# link_directories(
#     ${nanomsg_LIBDIR}
# )

# 设置 C++ 标准
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# 添加包含目录

# add_executable(EchoServer echo_server.cpp)
add_subdirectory(src)
